***********************************************
**RESTORING TRUST IN MEXICO’S POLICE***********
**Authors: Ana I. López García & Sarah Berens**
***********************************************
*EXPERIMENT E6

*1.DV
*2. Regression 
**2.1. Police Effectiveness
**2.2  Police Misconduct 
*3. Subgroup analysis


use "Data ready E6.dta", clear 

*****************************************************
*1.DV

*DEPENDENT VARIABLE DISTRIBUTION - Police Effectiveness
tab E6_police_effectiveness

*DEPENDENT VARIABLE DISTRIBUTION - Police Misconduct
tab E6_police_misconduct

********************************************************
*2. REGRESSION
*2.1 Regression - POLICE EFFECTIVENESS

*reg 
reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
margins E6_vign1 
margins E6_vign2

*Experimental Manipulation - work
*Difference from control group 
reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
margins r.E6_vign2, contrast(pveffects nowald) post

reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
pwcompare E6_vign2, pve

*Experimental Manipulation - gender 
*Difference from control group 
reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
margins r.E6_vign1, contrast(pveffects nowald) post

reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
pwcompare E6_vign1, pve

reg E6_police_effectiveness i.E6_vign1##i.E6_vign2
margins E6_vign1@E6_vign2, contrast(pveffects nowald) post

	
********************************************************
*2.3.POLICE MISCONDUCT

*reg 
reg E6_police_misconduct i.E6_vign1##i.E6_vign2
margins E6_vign1 
margins E6_vign2

*Experimental Manipulation - work
*Difference from control group 
reg E6_police_misconduct i.E6_vign1##i.E6_vign2
margins r.E6_vign2, contrast(pveffects nowald) post

reg E6_police_misconduct i.E6_vign1##i.E6_vign2
pwcompare E6_vign2, pve

*Experimental Manipulation - gender 
*Difference from control group 
reg E6_police_misconduct i.E6_vign1##i.E6_vign2
margins r.E6_vign1, contrast(pveffects nowald) post

reg E6_police_misconduct i.E6_vign1##i.E6_vign2
pwcompare E6_vign1, pve

reg E6_police_misconduct i.E6_vign1##i.E6_vign2
margins E6_vign1@E6_vign2, contrast(pveffects nowald) post


************************
**3. SUBGROUP ANALYSIS**
************************

*Female
reg E6_police_eff i.E6_vign1##i.E6_vign2##i.female
margins r.E6_vign1#female, contrast(nowald pveffects) post

reg E6_police_miscond i.E6_vign1##i.E6_vign2##i.female
margins r.E6_vign1#female, contrast(nowald pveffects) post

reg E6_police_eff i.E6_vign1##i.E6_vign2##i.female
margins r.E6_vign2#female, contrast(nowald pveffects) post

reg E6_police_miscond i.E6_vign1##i.E6_vign2##i.female
margins r.E6_vign2#female, contrast(nowald pveffects) post

*Fear of crime
reg E6_police_eff i.E6_vign1##i.E6_vign2##i.unsafe_neigh
margins r.E6_vign1#unsafe_neigh, contrast(nowald pveffects) post

reg E6_police_miscond i.E6_vign1##i.E6_vign2##i.unsafe_neigh
margins r.E6_vign1#unsafe_neigh, contrast(nowald pveffects) post

reg E6_police_eff i.E6_vign1##i.E6_vign2##i.unsafe_neigh
margins r.E6_vign2#unsafe_neigh, contrast(nowald pveffects) post

reg E6_police_miscond i.E6_vign1##i.E6_vign2##i.unsafe_neigh
margins r.E6_vign2#unsafe_neigh, contrast(nowald pveffects) post

*Crime victimisation 
reg E6_police_eff i.E6_vign1##i.E6_vign2##i.crime_victim
margins r.E6_vign1#crime_victim, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.crime_victim
margins r.E6_vign1#crime_victim, contrast(nowald pveffects) post

reg E6_police_eff i.E6_vign1##i.E6_vign2##i.crime_victim
margins r.E6_vign2#crime_victim, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.crime_victim
margins r.E6_vign2#crime_victim, contrast(nowald pveffects) post

*Police abuse
reg E6_police_eff i.E6_vign1##i.E6_vign2##i.police_abuse
margins r.E6_vign1#police_abuse, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.police_abuse
margins r.E6_vign1#police_abuse, contrast(nowald pveffects) post

reg E6_police_eff i.E6_vign1##i.E6_vign2##i.police_abuse
margins r.E6_vign2#police_abuse, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.police_abuse
margins r.E6_vign2#police_abuse, contrast(nowald pveffects) post

*Bribery
reg E6_police_eff i.E6_vign1##i.E6_vign2##i.police_bribe
margins r.E6_vign1#police_bribe, contrast(nowald pveffects) post

reg E6_police_eff i.E6_vign1##i.E6_vign2##i.police_bribe
margins r.E6_vign2#police_bribe, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.police_bribe
margins r.E6_vign1#police_bribe, contrast(nowald pveffects) post

reg E6_police_mis i.E6_vign1##i.E6_vign2##i.police_bribe
margins r.E6_vign2#police_bribe, contrast(nowald pveffects) post
